package com.htiiot.status.controller;

import com.htiiot.status.kafka.Listener;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 李延念
 * @create 2018-09-27 13:20
 **/
@RestController
public class MetricController {
    @RequestMapping(value = "/statusnum", method = RequestMethod.GET, produces = "application/json;charset=utf-8")
    public String getStatusSumNum(){
        long sum  = Listener.longAdder.sum();
        return String.valueOf( sum );
    }
}
